//小于0 补零
function zeroFill(number) {
    return number < 10 ? `0${number}` : number
}
export default function FormatDate(timestamp) {
    const date = new Date(timestamp)
    const year = date.getFullYear()
    const month = zeroFill(date.getMonth() + 1)
    const day = zeroFill(date.getDate())
    const hour = zeroFill(date.getHours())
    const minutes = zeroFill(date.getMinutes())
    const seconds = zeroFill(date.getSeconds())
    return `${year}-${month}-${day} ${hour}:${minutes}:${seconds}`
}